package com.namecard.namecardapi.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.namecard.namecardapi.entity.CardInfo;
import com.namecard.namecardapi.entity.vo.CardAllInfoVO;
import com.namecard.namecardapi.entity.vo.SpecialShopVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wzx
 * @since 2023-07-03
 */
@Mapper
public interface CardInfoMapper extends BaseMapper<CardInfo> {

    /**
     * 获取数据库中所有的名片id
     */
    List<String> selectCardIdList(Integer page,Integer limit,String title);
    /**
     * 获取数据库总条数
     */
    Integer cardIdListCount(String title);


    /**
     * 特殊数据购买符合的数据条数查询
     */
    List<CardInfo> selectSpecialDataListAllTrue(@Param("specialShopVO") SpecialShopVO specialShopVO);

    /**
     * 获取数据库中的名片加上颜色
     */
    CardInfo selectCard(String cardId);


    CardInfo selectCardInfo(String cardId);

    List<CardInfo> selectTop20(String titleId);

    /**
     * 根据卡片id查出userId
     */
    String selectUserIdByCardId(String cardId);
}
